projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3351f6
)
Signal a better error in tabulated-list-sort
author
Lars Ingebrigtsen
<larsi@gnus.org>
Mon, 29 Nov 2021 15:39:02 +0000
(16:39 +0100)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Mon, 29 Nov 2021 15:39:02 +0000
(16:39 +0100)
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Signal
error earlier on invalid column numbers (bug#52154).
lisp/emacs-lisp/tabulated-list.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/tabulated-list.el
b/lisp/emacs-lisp/tabulated-list.el
index 8f6c655dbef61b1a7df0b91eec4bfb31b6e508cf..075fe836f6bb0afe3881039cfadb50f03be95d75 100644
(file)
--- a/
lisp/emacs-lisp/tabulated-list.el
+++ b/
lisp/emacs-lisp/tabulated-list.el
@@
-684,6
+684,10
@@
With a numeric prefix argument N, sort the Nth column.
If the numeric prefix is -1, restore order the list was
originally displayed in."
(interactive "P")
+ (when (and n
+ (or (>= n (length tabulated-list-format))
+ (< n -1)))
+ (user-error "Invalid column number"))
(if (equal n -1)
;; Restore original order.
(progn